Author

Sarah Cohen

Published

October 13, 2025

Code
```{r}
#| label: setup
#| message: false
#| error: true

# assumes pacman has been installed already
# typical packages
pacman::p_load("tidyverse", "glue", "lubridate", "janitor", "readxl", "here", "googlesheets4")
here::i_am("programs/clean/01-arrest-checks.qmd")


#additional packages here
library(GGally)
library(skimr)
library(forcats)
```

Read the original xls file:

Rows: 291,722
Columns: 18
$ apprehension_date          <dttm> 2025-07-26 18:50:27, 2025-07-02 17:57:46, …
$ apprehension_state         <chr> "TEXAS", "NEVADA", "NEW YORK", "TEXAS", "TE…
$ apprehension_aor           <chr> "Houston Area of Responsibility", "Salt Lak…
$ final_program              <chr> "ERO Criminal Alien Program", "ERO Criminal…
$ final_program_group        <chr> "ICE", "ICE", "ICE", "ICE", "ICE", "ICE", "…
$ apprehension_method        <chr> "Custodial Arrest", "CAP Local Incarceratio…
$ apprehension_criminality   <chr> "3 Other Immigration Violator", "2 Pending …
$ case_status                <chr> "ACTIVE", "ACTIVE", "6-Deported/Removed - D…
$ case_category              <chr> "[1A] Voluntary Departure - Un-Expired and …
$ departed_date              <dttm> NA, NA, 2024-09-05, 2025-06-25, 2025-02-12…
$ departure_country          <chr> NA, NA, "GUYANA", "COLOMBIA", "EL SALVADOR"…
$ final_order_yes_no         <chr> "NO", "NO", "YES", "YES", "YES", "YES", "YE…
$ final_order_date           <dttm> NA, NA, 2014-03-13, 2025-03-02, 2025-01-10…
$ birth_year                 <dbl> 2002, 1984, 1968, 2004, 2000, 2003, 2000, 1…
$ citizenship_country        <chr> "HONDURAS", "MEXICO", "GUYANA", "COLOMBIA",…
$ gender                     <chr> "Male", "Male", "Female", "Male", "Male", "…
$ apprehension_site_landmark <chr> "MTG GENERAL AREA, NON-SPECIFIC", "NORTH LA…
$ unique_identifier          <chr> "000066a0cf0da888503506a0bd39e0772fada2ce",…

Check for duplicates. The Deportation Data Project says there are several ways to check.

  1. There are a handful of what appear to be true duplicates – those that are the same across each field.
  1. There are also some that are the same person on the same day. Here, I should check the time and see what they are. There may be stories in these.

These are way less clear. In some cases, it appears that a group of people without unique identifiers had the same thing happen at the same time. (Their years of birth, sex and country of origin can be different, but the time and date are the same.) In others, it appears that there are placeholder activities. I don’t know what the categories mean, so I can’t tell what to do with them.

Check frequency / crosstab of categories

I’m not sure what some of these categories mean, so I want to try to piece them together. I might be able to get some from Austen Kocher’s website, or it might be in the ICE arrest data that they post?

Visualize crosstabs of the data. GGPAIRS is one way to do that.

I have to reduce some of the categories to do that.

Criminal prosecution does not include “UNITED STATES” citizens - I thought it might contain some people who were arrested from this country.

What’s missing from this table:

  • Most serious crime conviction
  • Arrests that are not part of administrative warrants – this is likely people they just run into in the streets, or US citizens detained. Look at detention data and encounters for those?
  • Criminal alien program = “CAP”, which is when ICE arrests someone who was already in custody somewhere?

A 2018 paper from the Migration Policy Institute combined programs like this:

Arrests were categorized based on the ICE ERO program to which the arresting ICE officer was assigned. Criminal Alien Program (CAP) and 287(g) arrests were grouped together as “criminal justice system” arrests, with the bulk of these being CAP arrests. “At-large arrests” included Fugitive Operations, Violent Criminal Alien Sections, Law Enforcement Area Response Units, Mobile Criminal Alien Teams, and Joint Criminal Alien Response Teams; the bulk of these were Fugitive Operations Team arrests. About 7-10 percent of arrests could not be coded as “criminal justice system” or “at-large” arrests because they were coded as “detained docket,” “nondetained docket,” or using other terms that could not easily be classified. Arrests are coded based on the permanent responsibilities of the arresting officer, and officers are often detailed from other responsibilities to assist with at-large arrests during major operations, or to CAP arrests during CAP surges in federal, state, or local facilities. As a result, the assignment of arrests to the different ICE programs is necessarily imprecise

Non-detained docket: Refers to people ICE believes are removable but are not in ICE custody. These could be criminals in detention elsewhere, or they could be people out in the community. They could also be in alternatives to detention. A foreign-born non-citizen who comes into the country seeking asylum and has pending immigration proceedings are place into the non-detained docket. Or they can be someone here legally if they have been convicted of a crime or have a pending criminal case against them. In addition, they can be fugitives – we’re not sure if they’re still in the country, but ICE thinks they are. They can stay on the list indefinitely.

If someone is released from prison for a really serious crime, say homicide, they have to go into ICE’s mandatory detention program. The exception is that they can’t be kept there indefinitely, and might have to be released if their country won’t accept them.

July report from National Immigration Forum: Explainer: Immigration Removal Proceedings and Expanded Mandatory Detention in the U.S.

How to combine these: ERO Criminal Alien Program = people who were serving time in another jurisdiction for a crime. Fugitive Operations: 2nd biggest. Non-Detained Docket Control and Detained Docket Control? I have no idea what these mean.

Groupings:

 final_program_group                0         1       3   3     0        1          0
 5 apprehension_method                0         1       7  43     0       27      final_program_group                0         1       3   3     0        1          0
 5 apprehension_method                0         1       7  43     0       27
Error in parse(text = input): <text>:5:10: unexpected symbol
4: 
5: Criminal alien
            ^

Reactable table example

Here, I’ll put something to read in the custom theme, and then make a sample table using it. But for now, I’ll leave this blank

This is an example of a pretty complicated Reactable table, but it works for the purpose of setting up a shell. The theme is in the utilities folder.

ggplot defaults

Here, I’ll add in some ggplot defaults, but for now I’ll leave this blank.